Skip to contentSkip to conversation

Change in openvpn[master]: gerrit-send-mail: Make output consistent across systems

Openvpn-devel In review flichtenheld (Code Review) 2 participants 6 messages Jan 29, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1706525147000.Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/508?usp=email

to review the following change.

Change subject: gerrit-send-mail: Make output consistent across systems
......................................................................

gerrit-send-mail: Make output consistent across systems

When writing the file specify encoding and newline, so that the local settings (like locale) do not change the output.

Change-Id Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40

---
M dev-tools/gerrit-send-mail.py

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/08/508/1

dev-tools/gerrit-send-mail.py +1 -1
index 5429aef..67a2cf1 100755
@@ -109,7 +109,7 @@
     )
     filename = f"gerrit-{args.changeid}-{details['revision']}.patch"
     patch_text_final = patch_text_mod.replace("Subject: [PATCH]", f"Subject: [PATCH v{details['revision']}]")
-    with open(filename, "w") as patch_file:
+    with open(filename, "w", encoding="utf-8", newline="\n") as patch_file:
         patch_file.write(patch_text_final)
     print("send with:")
     print(f"git send-email --in-reply-to {details['msg_id']} {filename}")

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/508?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40
Gerrit-Change-Number: 508
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: cron2, flichtenheld.

plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/508?usp=email )

Change subject: gerrit-send-mail: Make output consistent across systems
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/508?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40
Gerrit-Change-Number: 508
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 29 Jan 2024 11:18:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH 1/1 gerrit-send-mail: Make output consistent across systems

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

When writing the file specify encoding and newline, so that the local settings (like locale) do not change the output.

Change-Id Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/508
This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]...>

dev-tools/gerrit-send-mail.py +1 -1
index 5429aef..67a2cf1 100755
@@ -109,7 +109,7 @@
     )
     filename = f"gerrit-{args.changeid}-{details['revision']}.patch"
     patch_text_final = patch_text_mod.replace("Subject: [PATCH v1]", f"Subject: [PATCH v{details['revision']}]")
-    with open(filename, "w") as patch_file:
+    with open(filename, "w", encoding="utf-8", newline="\n") as patch_file:
         patch_file.write(patch_text_final)
     print("send with:")
     print(f"git send-email --in-reply-to {details['msg_id']} {filename}")
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: gerrit-send-mail: Make output consistent across systems

Fixes issues with UTF8 in Files (user_pass UT test).

For added fanciness, could set charset header in resulting mail, so "git send-email" wouldn't have to ask... but that's less nuisance than "python explodes because UTF8" :-)

Your patch has been applied to the master branch.

commit e1f8c599aeb840909f5ea8e9ae0bc4dab5bc7deb

Author: Frank Lichtenheld
Date:   Mon Jan 29 15:57:56 2024 +0100
     gerrit-send-mail: Make output consistent across systems

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg28153.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/508?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by plaisthos

Change subject: gerrit-send-mail: Make output consistent across systems
......................................................................

gerrit-send-mail: Make output consistent across systems

When writing the file specify encoding and newline, so that the local settings (like locale) do not change the output.

Change-Id Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg28153.html

---
M dev-tools/gerrit-send-mail.py

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/08/508/2

dev-tools/gerrit-send-mail.py +1 -1
index 5429aef..67a2cf1 100755
@@ -109,7 +109,7 @@
     )
     filename = f"gerrit-{args.changeid}-{details['revision']}.patch"
     patch_text_final = patch_text_mod.replace("Subject: [PATCH]", f"Subject: [PATCH v{details['revision']}]")
-    with open(filename, "w") as patch_file:
+    with open(filename, "w", encoding="utf-8", newline="\n") as patch_file:
         patch_file.write(patch_text_final)
     print("send with:")
     print(f"git send-email --in-reply-to {details['msg_id']} {filename}")

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/508?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40
Gerrit-Change-Number: 508
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/508?usp=email )

Change subject: gerrit-send-mail: Make output consistent across systems
......................................................................

gerrit-send-mail: Make output consistent across systems

When writing the file specify encoding and newline, so that the local settings (like locale) do not change the output.

Change-Id Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg28153.html

---
M dev-tools/gerrit-send-mail.py

1 file changed, 1 insertion(+), 1 deletion(-)
dev-tools/gerrit-send-mail.py +1 -1
index 5429aef..67a2cf1 100755
@@ -109,7 +109,7 @@
     )
     filename = f"gerrit-{args.changeid}-{details['revision']}.patch"
     patch_text_final = patch_text_mod.replace("Subject: [PATCH]", f"Subject: [PATCH v{details['revision']}]")
-    with open(filename, "w") as patch_file:
+    with open(filename, "w", encoding="utf-8", newline="\n") as patch_file:
         patch_file.write(patch_text_final)
     print("send with:")
     print(f"git send-email --in-reply-to {details['msg_id']} {filename}")

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/508?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id7b4bda38adfbb446bdac635ac5d5207ef3f2f40
Gerrit-Change-Number: 508
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged